package com.fgba;

import org.springframework.util.DigestUtils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.DayOfWeek;
import java.time.LocalDate;

public class test {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String apiName = "gettemperaturerecords";
        String username = "admin";
        String password = "e10adc3949ba59abbe56e057f20f883e";
        String timestamp = "1646350367";
        String sign =DigestUtils.md5DigestAsHex(
                (URLEncoder.encode(apiName + "@" + username + "@" + password + "@" + timestamp, "UTF-8")).toLowerCase().getBytes());
        System.out.println(DigestUtils.md5DigestAsHex(
                (URLEncoder.encode(9381 + "@" + 394059, "UTF-8")).toLowerCase().getBytes()));
        System.out.println(sign);
    }
}
